//
//  UIColor+Extension.h
//  TableDemo
//
//  Created by jutuo on 2020/3/25.
//  Copyright © 2020 jutuo. All rights reserved.
//


#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIColor (Extension)
// 随机获取一种颜色
+ (UIColor *)arc4randomColor;

// 16进制颜色,alpha = 1.0
+ (UIColor *)colorFormRGBHex:(unsigned int)hex;

// 16进制颜色,alpha范围 0~1
+ (UIColor *)colorFormRGBHex:(unsigned int)hex alpha:(float)alpha;

// 获取color, 取值在0~255，alpha 默认 1.0
+ (UIColor *)colorFormRed:(CGFloat)red green:(float)green blue:(float)blue;

// 获取color, 颜色值取值在0~255，alpha 范围 0~1
+ (UIColor *)colorFormRed:(CGFloat)red green:(float)green blue:(float)blue alpha:(float)alpha;

// 将16进制的颜色转换成color
+ (UIColor *)colorWithHexString:(NSString *)hexString;

// 将16进制的颜色转换成color
+ (UIColor *)colorWithHexString:(NSString *)hexString alpha:(CGFloat)alpha;


@end

NS_ASSUME_NONNULL_END
